-
Notifications
You must be signed in to change notification settings - Fork 3
Fix: Break the line for \n #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes the display of newline characters in the runtime output by breaking the line for "\n" characters. The key changes include:
- Updating the newline branch in RuntimeOutputTextarea to wrap the newline span and a
inside a fragment. - Adjusting the layout in TestcaseValidationAccordion by adding flex classes and width definitions.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/components/Textareas/RuntimeOutputTextarea.tsx | Changes the newline display to include a line break and removes a key from non-newline elements. |
| src/components/TestcaseValidationAccordion.tsx | Enhances layout by adding flex classes and width settings to div elements. |
Comments suppressed due to low confidence (1)
src/components/Textareas/RuntimeOutputTextarea.tsx:29
- The fragment returned for newline characters lacks a key, which may cause React warnings when rendering arrays. Consider adding a key to the fragment (e.g., <React.Fragment key={i}>).
if (char === "\n") { return (<> <span className={cn(base, "text-blue-500")}>\n</span> <br /> </>); }
Deploying modelgrader-frontend with
|
| Latest commit: |
47f230b
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://d4ddbd01.modelgrader-frontend.pages.dev |
| Branch Preview URL: | https://dev.modelgrader-frontend.pages.dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes newline rendering in the RuntimeOutputTextarea by adding an explicit break element for "\n" and adjusts the layout in TestcaseValidationAccordion.
- Updated the newline rendering in RuntimeOutputTextarea to include a
element - Modified the TestcaseValidationAccordion layout by adding a flex class and clarifying empty container widths
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/components/Textareas/RuntimeOutputTextarea.tsx | Corrects newline rendering to ensure a line break is inserted for "\n". |
| src/components/TestcaseValidationAccordion.tsx | Enhances layout styling by adding flex utilities for consistent spacing. |
Comments suppressed due to low confidence (1)
src/components/Textareas/RuntimeOutputTextarea.tsx:29
- The fragment returned for rendering a newline lacks a key property when used inside a map. To ensure proper reconciliation, consider adding a key (e.g., key={i}) to the fragment, possibly by using <React.Fragment key={i}> instead of the shorthand.
if (char === "\n") {
No description provided.